home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / gdb36p4s.zoo / readline / Makefile < prev    next >
Encoding:
Makefile  |  1993-01-30  |  2.5 KB  |  86 lines

  1. ## -*- text -*- ####################################################
  2. #                                   #
  3. # Makefile for readline and history libraries.               #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # Here is a rule for making .o files from .c files that doesn't force
  8. # the type of the machine (like -sun3) into the flags.
  9. .c.o:
  10.     $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) \
  11.         $(READLINE_DEFINES) $(CPPFLAGS) $*.c
  12.  
  13. # Destination installation directory.  The libraries are copied to DESTDIR
  14. # when you do a `make install', and the header files to INCDIR/readline/*.h.
  15. DESTDIR = /gnu/lib
  16. INCDIR = /gnu/include
  17.  
  18. # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
  19. # a return type of "void" for signal handlers.
  20. TYPES = -DVOID_SIGHANDLER
  21.  
  22. # Define USG as -DUSG if you are using a System V operating system.
  23. #USG = -DUSG
  24.  
  25. # HP-UX compilation requires the BSD library.
  26. #LOCAL_LIBS = -lBSD
  27.  
  28. # Xenix compilation requires -ldir -lx
  29. #LOCAL_LIBS = -ldir -lx
  30.  
  31. # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
  32. # the vi line editing mode and features.  Make sure to comment out the
  33. # definition of VI if you remove the -DVI_MODE.
  34. READLINE_DEFINES = $(TYPES) -DHAVE_UNISTD_H # -DVI_MODE
  35.  
  36. DEBUG_FLAGS = -O2 -fomit-frame-pointer
  37. LDFLAGS = $(DEBUG_FLAGS) 
  38. CFLAGS = $(DEBUG_FLAGS) $(USG) -I.
  39.  
  40. # A good alternative is gcc -traditional.
  41. #CC = gcc -traditional
  42. CC = gcc
  43. RANLIB = @:
  44. AR = ar
  45. RM = rm -f
  46. CP = cp
  47.  
  48. LOCAL_INCLUDES = -I..
  49.  
  50. XMALLOC_DIR = .
  51. XMALLOC_C   = $(XMALLOC_DIR)/xmalloc.c
  52. XMALLOC_O   = xmalloc.o
  53. TILDE_DIR   = .
  54. TILDE_C     = $(TILDE_DIR)/tilde.c
  55. TILDE_O     = tilde.o
  56.  
  57. CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
  58.        emacs_keymap.c vi_keymap.c $(TILDE_C)
  59.  
  60. HSOURCES = readline.h chardefs.h history.h keymaps.h
  61. SOURCES  = $(CSOURCES) $(HSOURCES)
  62.  
  63. OBJECTS = readline.o vi_mode.o history.o funmap.o keymaps.o xmalloc.o tilde.o
  64.  
  65. ##########################################################################
  66.  
  67. all: libreadline.a
  68.  
  69. libreadline.a:    $(OBJECTS)
  70.     $(RM) $@
  71.     $(AR) cs $@ $(OBJECTS)
  72.  
  73. readline: readline.h chardefs.h $(OBJECTS)
  74.     $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  75.       $(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
  76.       $(TILDE_O) $(XMALLOC_O) keymaps.o history.o -L. -ltermcap
  77.  
  78. readline.o:    readline.c readline.h chardefs.h  keymaps.h history.h
  79. history.o:    history.c history.h
  80. vi_mode.o:    vi_mode.c
  81. funmap.o:    funmap.c readline.h
  82. keymaps.o:    keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h
  83.  
  84. clean:
  85.     rm -f $(OBJECTS) *.a
  86.